﻿(function () {
    "use strict";

    var PointerThemeAnimation = function (element) {
        element.addEventListener("MSPointerDown", PointerDownThemeAnimation(element), false);
        element.addEventListener("MSPointerUp", PointerUpThemeAnimation(element), false);
        element.addEventListener("mouseout", PointerUpThemeAnimation(element), false);
    }

    var PointerDownThemeAnimation = function (self) {
        return function (event) {
            WinJS.UI.Animation.pointerDown(self);
        };
    }

    var PointerUpThemeAnimation = function (self) {
        return function (event) {
            WinJS.UI.Animation.pointerUp(self);
        };
    }

    var publicMembers = {
        PointerThemeAnimation: PointerThemeAnimation
    };

    WinJS.Namespace.define("MyAnimation", publicMembers);

})();